package com.hzy.alibaba.exception;

/***
 * @author huangzhaoyong
 * @desc OperationException
 * @date  2019/11/15 0015 上午 11:42
 */
public class OperationException extends Exception {
    private Integer code;

    /**
     * 用详细信息指定一个异常
     * @param message
     */
    public OperationException(String message){
        super(message);
        this.code = 400;
    }

    /**
     * 用详细信息指定一个异常
     * @param code
     * @param message
     */
    public OperationException(Integer code, String message){
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
